package com.yl.controller;

import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.yl.dto.OrdersDTO;
import com.yl.service.IOrdersService;

@Controller
@RequestMapping("/admin/orders")
public class AdminOrdersController {

	@Resource
	private IOrdersService ordersService;
	
	/** 后台查询所有订单
	 * @param o
	 * @return 
	 */
	@RequestMapping("/findAllorders.do")
	@ResponseBody
	public Map findAllorders(OrdersDTO o) {
		System.out.println(o.toString());
		return ordersService.findAllorders(o);
	}
	
	/** 后台显示未发货订单
	 * @return
	 */
	@RequestMapping("/findPayOrder.do")
	@ResponseBody
	public Map findPayOrder() {
		return ordersService.findPayOrder();
	}
	
	/** 后台显示发货订单
	 * @return
	 */
	@RequestMapping("/findFaOrder.do")
	@ResponseBody
	public Map findFaOrder() {
		return ordersService.findFaOrder();
	}
	
}
